package front

import (
	"net/http"
	"time"

	"github.com/convee/goblog/internal/pkg/mysql"
	"github.com/convee/goblog/internal/pkg/view"
)

func VisitInfo(w http.ResponseWriter, r *http.Request) {
	date := time.Now()
	data := make(map[string]interface{})
	visit_count, _ := mysql.GetVisitLogCount(date)
	all_visit_count, _ := mysql.GetAllVisitLogkCount()
	data["visit_count"] = visit_count
	data["all_visit_count"] = all_visit_count

	view.Render(data, w, "page")
}
